﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace Angle.Krill
{
    public partial class WinWallpaper : Form
    {

        public WinWallpaper()
        {
            InitializeComponent();

            //this.webView.Visible = false;

        }

        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case 0x0011:
                    m.Result = (IntPtr)1;
                    break;
                default:
                    base.WndProc(ref m);
                    break;
            }
        }

        internal void SetParam(Microsoft.Web.WebView2.WinForms.WebView2 webView, Rectangle rect)
        {
            this.FormBorderStyle = FormBorderStyle.None;
            this.Left = rect.Left;
            this.Top = rect.Top;
            this.Width = rect.Width;
            this.Height = rect.Height;

            this.Controls.Add(webView);
        }
    }
}
